<script src='{$base_dir}js/jquery.tablesorter.min.js' type='text/javascript' ></script>
<script src='{$base_dir}js/jquery.tablesorter.pager.js' type='text/javascript' ></script>
<script src='{$base_dir}js/AJAX_Queue.js' type='text/javascript' ></script>
<script src='{$base_dir}js/jquery.contextmenu.r2.packed.js' type='text/javascript' ></script>
<script type='text/javascript'>
	{literal}	
	$(document).ready(function () {
		activeMenu('2', '5');		
		viewDoctorQueue();	
		$('table#table_inline_encounter_queue').tablesorter();	
		$('table#table_inprogress_encounter_queue').tablesorter();	
		$('table#table_waiting_encounter_queue').tablesorter();
	});
	{/literal}
</script>

<div id='main_queue'>
	<table cellpadding='0' cellspacing='0'>
		<tr>
		{if !empty($encounterRoom)}
			<td  style='padding-right: 10px; text-transform: uppercase;'>
				<span class='label' style='font-weight: bold;'>{translate}Select room{/translate}</span>&nbsp;
				<select id='doctor_room' style='width: 200px;'>
					{html_options options=$encounterRoom selected=$defaultRoom}
				</select>
			</td>
		{/if}	
			<td>
				<div id='reload' style='display:none; width: 100px;'>
					<a href='javascript:viewDoctorQueue();' title='{translate}Update list of patients{/translate}'><img src='{$base_uri}/images/refresh.png'/></a>						
				</div>
				<div id='innerLoading' style='display:block; width: 100px;'>
					<img src='{$base_uri}/images/ajax-loader.gif'/>
				</div>
			</td>
		</tr>
	</table>	
				
	<div id='inline_encounter_queue' class='queue'>
		<!-- {include file='main/big_element_paging.html'} -->
		<div class='documentListHeader'>
			<span> {translate}List of patients wait for examination{/translate} </span>
		</div>	
		<table id='table_inline_encounter_queue' cellspacing='0' cellpadding='0' class='grid' style='width: 100%;'>						
			<thead>
				<tr>
					<th>{translate}Order number{/translate}</th>
					<th>{translate}Patient_1{/translate}</th>
					<th>{translate}Patient's ID_1{/translate}</th>								
					<th>{translate}Service{/translate}</th>
					<th>{translate}Check-in{/translate}</th>
					<th>{translate}Waiting time_1{/translate}</th>
					<th>{translate}Receptionist{/translate}</th>	
					<th>&nbsp;</th>																		
				</tr>	
			</thead>
			<tbody>
			</tbody>	
		</table>				
	</div>
		
	<div id='inprogress_encounter_queue' class='queue'>
		<div class='documentListHeader'>
			<span> {translate}Patients are examining{/translate} </span>
		</div>
		<table id='table_inprogress_encounter_queue' cellspacing='0' cellpadding='0' class='grid' style='width: 100%;'>						
			<thead>
				<tr>
					<th>{translate}Order number{/translate}</th>
					<th>{translate}Patient_1{/translate}</th>
					<th>{translate}Patient's ID_1{/translate}</th>								
					<th>{translate}Service{/translate}</th>
					<th>{translate}Check-in{/translate}</th>
					<th>{translate}Examining time_1{/translate}</th>
					<th>{translate}Doctor{/translate}</th>																		
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>				
	</div>				
	
	<div id='waiting_encounter_queue' class='queue'>
		<div class='documentListHeader'>
			<span style='text-transform: uppercase;'> {translate}Patients are waiting for the test result{/translate} </span>
		</div>
		<table id='table_waiting_encounter_queue' cellspacing='0' cellpadding='0' class='grid' style='width: 100%;'>												
			<thead>
				<tr>
					<th>{translate}Order number{/translate}</th>
					<th>{translate}Patient_1{/translate}</th>
					<th>{translate}Patient's ID_1{/translate}</th>								
					<th>{translate}Service{/translate}</th>
					<th>{translate}Check-in{/translate}</th>
					<th>{translate}Waiting time_1{/translate}</th>
					<th>{translate}Doctor{/translate}</th>			
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>				
	</div>

	<div class='contextMenu' id='doctorQueueMenu'>
		<ul>
			<li id='remove'><b>{translate}Cancel call{/translate}</b></li>
			<li id='changeDoctor'><b>{translate}Change doctor{/translate}</b></li>
		</ul>
	</div>
</div>	
	